import Cookies from 'js-cookie'

const TokenKey = 'shenling_token'
const userInfo = 'shenling_userInfo'

export function getToken() {
  return Cookies.get(TokenKey)
}
export function getUserInfo() {
  return Cookies.get(userInfo)
}
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
export function setUserInfo(user) {
  return Cookies.set(userInfo, user)
}
export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function removeUserInfo() {
  return Cookies.remove(userInfo)
}
